﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Generic.Contract;
using Generic.Business.Manager;
using Generic.Business.Validation;

namespace Generic.Business.Process
{
    public abstract class BusinessProcess<BE, FE, BM, BV>
        where BE : BusinessEntity, new()
        where FE : FilterEntity
        where BM : IBusinessManager<BE,FE>, new()
        where BV : BusinessValidation, new()
    {
        private BM _BusinessManager;
        private BV _BusinessValidation;

        public BusinessProcess()
        {
            _BusinessManager = new BM();
            _BusinessValidation = new BV();
        }

        virtual protected BM BusinessManager
        {
            get { return _BusinessManager; }
            set { _BusinessManager = value; }
        }

        virtual protected BV BusinessValidation
        {
            get { return _BusinessValidation; }
            set { _BusinessValidation = value; }
        }

    }
}
